package pmtest.com.main;

import java.text.SimpleDateFormat;
import java.util.Date;


public class DateUtil {

    private static String DatePattern = "yyyy-MM-dd";
    private static String TimePattern = "HH:mm:ss";

    public static String getDatePattern() {
        return DatePattern;
    }

    public static final String format(Date aDate) {
        return format(aDate, DatePattern);
    }

    public static final String format(Date aDate, String datePattern) {
        SimpleDateFormat df = null;
        String returnValue = "";

        if (aDate != null) {
            df = new SimpleDateFormat(datePattern);
            returnValue = df.format(aDate);
        }

        return returnValue;
    }

    public static void main(String[] args) {

        System.out.println("===========main==============");
    }

}
